home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / BEND.ZIP / BEND.TXT < prev    next >
Encoding:
Text File  |  1997-06-13  |  6.7 KB  |  178 lines

  1. **************************************************************************
  2. **************************************************************************
  3.          OBJECT BENDER INCLUDE FILE FOR PERSISTENCE OF VISION 3.x
  4. **************************************************************************
  5. **************************************************************************
  6.  
  7. Created by Chris Colefax, 13 June 1997
  8.  
  9. 1.0  INSTALLATION
  10. 2.0  QUICK START
  11. 3.0  OPTIONS
  12.         3.1  OBJECT OPTIONS
  13.                 3.1.1  bend_object
  14.                 3.1.2  object_axis1 & object_axis2
  15.         3.2  BEND OPTIONS
  16.                 3.2.1  bend_angle
  17.                 3.2.2  bend_direction
  18.                 3.2.3  bend_smoothness
  19.                 3.2.4  bend_start
  20.                 3.2.5  bend_finish
  21.  
  22. 4.0  CONTACTING THE AUTHOR
  23.  
  24. **************************************************************************
  25.  
  26.  
  27. 1.0  INSTALLATION
  28. **************************************************************************
  29. Copy the Object Bender include file (Bend.inc) to one of the directories
  30. (folders) in your POVRay library path.  Normally this is the INCLUDE
  31. sub-directory of the directory where you installed POVRay, so if you
  32. installed POVRay in C:\POVRAY you should copy the Bend.inc file to
  33. C:\POVRAY\INCLUDE.  On a Windows 95 system, this is probably something 
  34. like:
  35.  
  36.    C:\Program Files\POV-Ray for Windows\Include
  37.  
  38. On UNIX and similar systems, where filenames are case-sensitive, you may
  39. have to rename the include file so that it starts with a capital and the
  40. rest of its letters are lowercase.  This will enable you to render the
  41. sample files without modification.
  42.  
  43.  
  44. 2.0  QUICK START
  45. **************************************************************************
  46. The Object Bender include file lets you bend any POVRay object, from a
  47. simple box to a complex CSG object.  You can specify the direction to
  48. bend the object in, and bend the object by any angle up to 360 degrees.
  49. There are other options which control how the object will be bent;
  50. to use any of these you simply add the following line to your POVRay
  51. scene file:
  52.  
  53.    #declare [variable-name] = [value]
  54.  
  55. substituting the desired variable name and value where appropriate.  After
  56. you have declared all the options you want to use, you add the following
  57. line to your POVRay scene file:
  58.  
  59.    #include "Bend.inc"
  60.  
  61. The Object Bender include file will then automatically create the bent
  62. object for you.  Although only one option is required to bend an object
  63. (bend_object) you will want to use the options listed below to ensure
  64. you get the result that you want.
  65.  
  66.  
  67. 3.0  OPTIONS
  68. **************************************************************************
  69.  
  70. 3.1  OBJECT OPTIONS
  71. *******************
  72. The first step when using the Object Bender include file is to specify
  73. a number of parameters that identify the object you wish to bend, as
  74. well as it's position in the POVRay universe.
  75.  
  76. 3.1.1  bend_object
  77. ******************
  78. This parameter indicates the object you want to bend, and can be either
  79. a predefined object or a completely new object definition, including
  80. textures and transformations, eg:
  81.  
  82.    #declare bend_object = object {MyObject scale 3}
  83.    #declare bend_object = cylinder {-y, y, .3 pigment {Red}}
  84.  
  85. Any POVRay object can be used, including CSG objects and triangle meshes.
  86.  
  87. 3.1.2  object_axis1 & object_axis2
  88. **********************************
  89. The two axis parameters are vectors which indicate the axis of the
  90. bend_object.  The bend axis is like a piece of wire that runs through the
  91. object, starting at object_axis1 and ending at object_axis2.  When the
  92. wire is bent, the object stretches and squashes to follow the shape of
  93. the wire.  When bending the object, object_axis1 remains fixed, while
  94. object_axis2 is moved as the axis is bent.
  95.  
  96. The default for object_axis1 is -y; the default for object_axis2 is +y
  97.  
  98.  
  99. 3.2  BENDING OPTIONS
  100. ********************
  101.  
  102. 3.2.1  bend_angle
  103. *****************
  104. This is the angle (measured in degrees) that the object will be bent by.
  105. It can range from 0 (no bending) to 360 (the object is bent in a full
  106. circle).  Using bend_angle = 180 will bend the object in a half circle,
  107. and other angles will bend the object by different amounts.  You can also
  108. use negative angles to bend the object backwards.
  109.  
  110. The default for bend_angle is 45 degrees
  111.  
  112. 3.2.2  bend_direction
  113. *********************
  114. This vector specifies the direction in which to bend the object; if the
  115. bend_object lies along the x-axis, using bend_direction = y will bend the
  116. object upwards.
  117.  
  118. The default for bend_direction is x
  119.  
  120. 3.2.3  bend_smoothness
  121. **********************
  122. This option controls how smooth the bent object will be; using smaller
  123. numbers will give an angular bend, while using larger numbers will make
  124. the bend much smoother.  The value of bend_smoothness specifies how many
  125. segments the bend_object will be divided into, per full revolution, eg:
  126. if you use bend_smoothness = 50 and bend_angle = 180, the Object Bender
  127. include file will use 25 segments when bending the object.
  128.  
  129. This option can have a large effect on the speed of parsing and
  130. rendering; if you are doing quick preview you should set bend_smoothness
  131. to 0 (which will use the minimum number of segments).  If the bent
  132. object is not as smooth as you want, you should increase this option.
  133.  
  134. The default for bend_smoothness is 100
  135.  
  136. 3.2.4  bend_start
  137. *****************
  138. You can use this option to only bend a partial section of the bend_object,
  139. rather than bending the whole object.  The value of this option should lie
  140. between 0 and 1, eg. using bend_start = .5 will only start bending the
  141. object halfway along its length.
  142.  
  143. The default for bend_start is 0
  144.  
  145. 3.2.5  bend_finish
  146. ******************
  147. This option also allows you to partially bend an object, and its value
  148. should lie between 0 and 1, eg. using bend_finish = .7 will stop bending
  149. the object 70% along its length (the rest of the object will continue
  150. straight from this point).
  151.  
  152. The default for bend_finish is 1
  153.  
  154. Note that you can use the bend_start and bend_finish options together to
  155. only bend the middle section of an object, eg. bend_start = .3 and
  156. bend_finish = .6 will only bend the middle 30% of the object.
  157.  
  158.  
  159. 4.0  CONTACTING THE AUTHOR
  160. **************************************************************************
  161. If you wish to contact me with bug reports, bug fixes, criticisms, 
  162. comments, suggested improvements, questions, etc. you can reach me by 
  163. email at:
  164.  
  165.    ccolefax@geocities.com
  166.  
  167. or by regular mail at:
  168.  
  169.    Chris Colefax
  170.    PO Box 110
  171.    Kuranda, Queensland
  172.    Australia  4872
  173.  
  174. **************************************************************************
  175.  
  176. POV-Ray(tm) and Persistence of Vision(tm) are registered trademarks of the
  177. POV-Ray Team(tm)
  178.